package com.ymttest.database.sqlwapper;

import java.util.List;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.couponconversioncode;
import com.ymttest.database.model.couponsequence;
import com.ymttest.utils.EnvSetup;

public class couponsequenceWapper {
	SqlManager manage;

    public couponsequenceWapper() {
        manage = new SqlManager("mysqlcoupon" + EnvSetup.getEnv());
    }
    
    public couponsequence selectByPrimaryKey(Integer sequenceId) {
    	couponsequence couponsequence=new couponsequence();
        List<couponsequence> list = manage
                .getSelectResults(
                        "com.ymttest.database.mapping.couponsequenceMapper.selectByPrimaryKey",
                        sequenceId);
        if(list.size()>0){
        	couponsequence=list.get(0);
        }
        return couponsequence;
    }
    
    public int updateByPrimaryKey(couponsequence couponsequence)
    {
    	int result=manage.update("com.ymttest.database.mapping.couponsequenceMapper.updateByPrimaryKey", couponsequence);
    	manage.commit();
    	return result;
    }
}
